<?php
class Danhba_cat_Model extends CI_Model{

	public function __construct(){
		parent::__construct();
//		$this->db_gyomu = $this->load->database('gyomu', TRUE);
		$this->db 		= $this->load->database('default', TRUE);
	}
	public function getAllDanhBa(){
//		$data = $this->db->get("danhba_cat");
//		$this->db->order_by("orders","asc");
		$sql = "SELECT id, name, orders FROM `danhba_cat` ORDER BY `danhba_cat`.`orders` ASC";
		$data = $this->db->query($sql);
		return $data->result_array();
	}
}